# include <stdio.h>
int main()
{
	int i = 0;
	int count= 0;
	for (i = 1000; i <= 2000; i++)
	{
		if ((0 == i % 4) && (0 != i % 100) || (0 == i % 400))
		{
			printf("%d ",i);
			count++;
		}
		
	}
	printf("\n%d", count);
	return 0;
}